gdkkeys-win32.c: fix initialisation of key_state in update_keymap
authorJeremy Tan <jtanx@outlook.com>
Fri, 9 Jul 2021 04:35:44 +0000 (12:35 +0800)
committerJeremy Tan <jtanx@outlook.com>
Fri, 9 Jul 2021 04:46:49 +0000 (12:46 +0800)
It apparently worked by chance in the past, but now causes e.g.
alphanumeric characters to be interpreted as half-width katakana
when using the Japanese IME.

gdk/win32/gdkkeys-win32.c

index 976003aea32d0da797bdee6f6f01cda3e7d4811f..981f52ab54bd92a3c35805c71c3c21b04f58f882 100644 (file)
@@ -694,6 +694,7 @@ update_keymap (GdkKeymap *gdk_keymap)
   if (hkls_len != keymap->layout_handles->len)
     keymap->keysym_tab = g_renew (guint, keymap->keysym_tab, keysym_tab_size);
 
+  memset (key_state, 0, sizeof(key_state));
   memset (keymap->keysym_tab, 0, keysym_tab_size);
   g_array_set_size (keymap->layout_handles, hkls_len);
   g_array_set_size (keymap->options, hkls_len);